//
//  RightSearchSonTableViewCell.m
//  PerfectWorld
//
//  Created by dllo on 16/9/7.
//  Copyright © 2016年 LST. All rights reserved.
//

#import "RightSearchSonTableViewCell.h"
#import "UIImageView+WebCache.h"
#import "Projects.h"
#import "User.h"
#import "UserImage.h"
@implementation RightSearchSonTableViewCell

- (void)setProjects:(Projects *)projects {
    _projects = projects;
    _topLabel.text = projects.title;
    _bottomLabel.text = [NSString stringWithFormat:@"%@ . %@ . %@平米 . %@万元", projects.styleShow, projects.typeShow, projects.areaShow, projects.costShow];
    _leftLabel.text = @"匹配度: 中";
    // _nameImage.layer.cornerRadius = 40;
    [_nameImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",projects.user.userImage.large]] placeholderImage:nil];
    NSNumber *num = @(projects.coverPhoto);
    NSString *str = [num description];
    NSString *str2 = [str substringToIndex:3];
    [_backGroundImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://image.gooju.cn/images/%@/9/%@_0_9-.jpg", str2, str]] placeholderImage:nil];
    }

- (void)layoutSubviews {
    [super layoutSubviews];
    _nameImage.layer.cornerRadius = 40;
    _nameImage.layer.masksToBounds = YES;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    [self layoutIfNeeded];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
